<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="./vue.js"></script>
    <style>
        .bgcolor{
            background-color: cornflowerblue;
        }
    </style>
</head>
<body>
    <div id="app">
        <!-- 

         -->
         <span v-for="(item,index) in arr" :key="item">
            <input type="radio" name="a"> {{ item }}
        </span>
        <!--  -->
        <button @click="fn">点击</button>
    </div>
    <script>
        new Vue({
            el:"#app",
            data:{
                arr:[1,2,3]
            },
            methods: {
                fn(){
                    var len = this.arr.length+1;
                    this.arr.unshift(len)
                }
            }
        })
    </script>
</body>
</html>